#if !defined(AFX_SHORTCONNECTION_H__09A2DF32_5AD4_4263_9BBD_4943836EDEE4__INCLUDED_)
#define AFX_SHORTCONNECTION_H__09A2DF32_5AD4_4263_9BBD_4943836EDEE4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ShortConnection.h : header file
//

#include "ControlInterface.h"
#include "Transport.h"

#define MAX_TRANSPORT_THREAD	500

/////////////////////////////////////////////////////////////////////////////
// CShortConnection thread

class CShortConnection : public CControlInterface
{
	DECLARE_DYNCREATE(CShortConnection)
public:
	CShortConnection();           // protected constructor used by dynamic creation
	virtual ~CShortConnection();
// Attributes
public:

// Operations
public:
	virtual BOOL StartControl();
	
	virtual BOOL StopControl();

	virtual int GetType();

	void CloseOneTrans(CTransport *trans);

//	void OneConnect(int socket);

	BOOL ListenProc(int listenPort);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShortConnection)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL
	

	int curThreadCount;
	CTransport *transMap[MAX_TRANSPORT_THREAD];
// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CShortConnection)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	afx_msg void OneConnect(WPARAM wParam, LPARAM lParam);
//	afx_msg void DisConnect(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SHORTCONNECTION_H__09A2DF32_5AD4_4263_9BBD_4943836EDEE4__INCLUDED_)
